{% extends "admin/admin_base.html" %}

{% block content %}

<!--显示闪现的消息-->
{% with messages = get_flashed_messages() %}
{% if messages %}
<ur>
    {% for message in messages %}
    <div class="alert alert-success" style="text-align: center">
        <button aria-hidden="true" data-dismiss="alert" class="close" type="button">×</button>
        <li>{{ message }}</li>
    </div>
    {% endfor %}
</ur>
{% endif %}
{% endwith %}

<h1>修改用户信息</h1>
<form action="" method="post">
    <div class="form-group">
        {{ form.hidden_tag() }}
        <label>{{ form.username.label }}</label>
        {{ form.username(class="form-control") }}
        {% for error in form.username.errors %}
        <span class="text-danger">{{ error }}</span>
        {% endfor %}
    </div>
    <div class="form-group">
        <label>{{ form.email.label }}</label>
        {{ form.email(class="form-control") }}<br>
        {% for error in form.email.errors %}
        <span class="text-danger">{{ error }}</span>
        {% endfor %}
    </div>
    <div class="form-group">
        <label>{{ form.about_me.label }}</label>
        {{ form.about_me(class="form-control") }}<br>
        {% for error in form.about_me.errors %}
        <span class="text-danger">{{ error }}</span>
        {% endfor %}
    </div>
    <p>{{ form.submit(class="btn btn-primary") }}</p>
</form>

{% endblock %}